
/**
 * 判断path是否为外链
 * @param {string} path
 * @returns {Boolean}
 */
export function isExternal(path: any) {
  return /^(https?:|mailto:|tel:)/.test(path);
}
/**
 * 判断是否输入空值
 * @param {string} str
 * @returns {Boolean}
 */
export const isEmpty = (str: string) => {
  if (str === '') return true;
  const reg = '^[ ]+$';
  const res= new RegExp(reg);
  return res.test(str);
} ;
